﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Resto.CostControl.WebControl.DWZAdapter;
using Enterprise.Framework.DomainModel;

namespace Resto.CostControl.Core
{
    /// <summary>
    /// PageInfo的扩展方法
    /// </summary>
    public static class PageInfoExtensions
    {
        /// <summary>
        /// 获取枚举项的扩展信息
        /// </summary>
        /// <param name="e"></param>
        /// <returns></returns>
        public static PagerCondition ToPager(this DWZPageInfo pageInfo)
        {
            return new PagerCondition()
            {
                CurrentPage = pageInfo.PageIndex + 1,
                IsGetRecordCount = true,
                PageSize = pageInfo.PageSize,
            };
        }
    }
}
